1: | le(0,y) | → true | |
2: | le(s(x),0) | → false | |
3: | le(s(x),s(y)) | → le(x,y) | |
4: | minus(x,0) | → x | |
5: | minus(0,x) | → 0 | |
6: | minus(s(x),s(y)) | → minus(x,y) | |
7: | gcd(0,y) | → y | |
8: | gcd(s(x),0) | → s(x) | |
9: | gcd(s(x),s(y)) | → if_gcd(le(y,x),s(x),s(y)) | |
10: | if_gcd(true,x,y) | → gcd(minus(x,y),y) | |
11: | if_gcd(false,x,y) | → gcd(minus(y,x),x) | |
12: | LE(s(x),s(y)) | → LE(x,y) | |
13: | MINUS(s(x),s(y)) | → MINUS(x,y) | |
14: | GCD(s(x),s(y)) | → IF_GCD(le(y,x),s(x),s(y)) | |
15: | GCD(s(x),s(y)) | → LE(y,x) | |
16: | IF_GCD(true,x,y) | → GCD(minus(x,y),y) | |
17: | IF_GCD(true,x,y) | → MINUS(x,y) | |
18: | IF_GCD(false,x,y) | → GCD(minus(y,x),x) | |
19: | IF_GCD(false,x,y) | → MINUS(y,x) | |